package com.zzu.base.controller.permission.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@Schema(description = "权限分页查询参数")
public class PermissionPageReqVO {

    @Schema(description = "页码（默认1，最小值1）")
    @Min(value = 1, message = "页码不能小于1") // 页码至少为1
    private Integer pageNum = 1;

    @Schema(description = "每页条数（默认10，范围1-100）")
    @Min(value = 1, message = "每页条数不能小于1")    // 至少1条
    @Max(value = 100, message = "每页条数不能超过100") // 最多100条（避免查询压力过大）
    private Integer pageSize = 10;

    @Schema(description = "权限名（模糊查询，长度1-20）")
    @Size(min = 1, max = 20, message = "权限名长度为1-20个字符")
    private String permissionName;
}
